<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title><{$title|default:'表单编辑'}></title>
    <!-- 载入所有的模板变量到 varTemplate 变量中 -->
    <{include file='_common/_loadVarTemplate.tpl'}>
    <script src="Resource/Script/requireJs/require.js" data-main="<{webcontrol type="LoadJsCss" isPath="true" src="Resource/Script/requireJs/_mainForm.js"}>"></script>
    <{webcontrol type='LoadJsCss' src="Resource/Script/layui/layui/css/layui.css"}>
    <{webcontrol type='LoadJsCss' src="Resource/Script/layui/style/admin.css"}>
    <style type="text/css">
      ::-webkit-scrollbar {
        width: 6px;
        height: 8px;
    }
    div::-webkit-scrollbar:hover {
        height: 8px;
        background-color: rgba(0,0,0, .25);
    }
    ::-webkit-scrollbar-thumb {
      border-radius: 1px;
      background-color: rgba(0, 0, 0, .3)
    }
    div::-webkit-scrollbar-thumb:hover {
      border-radius: 6px;
      background-color: rgba(0, 0, 0, .4)
    }
    </style>
  </head>
  <body>
    <div class="" id="div1">
      <el-container>
        <el-main>
          <el-form
            :model="row"
            ref='ruleForm'
            :rules="rules"
            @submit.native.prevent
            >
            <comp-card
              card-width-col="8"
              card-height="100%"
              :card-title="formTitle"
              >
              <template slot="body">
                <el-form-item
                  v-for="item,i in formItems"
                  :key="item.name"
                  :label="item.title"
                  :prop="item.name"
                  label-width="120px"
                  >
                  <component
                    :is="item.type"
                    :fld="item"
                    :value="row[item.name]||item.value"
                    :display-text="row[item.displayRowKey||item.displayKey]"
                    @input="handleInput(row,item.name,arguments[0])"
                    :ref="item.name"
                    :row="row"
                    />
                </el-form-item>
              </template>
              <template slot="footer">
                <el-button type="primary" @click="submitForm('ruleForm')" :disabled="disableSubmit"><{$form.submit.text|default:'提交'}></el-button>
                <el-button @click="resetForm('ruleForm')"><{$form.reset.text|default:'重置'}></el-button>
              </template>

            </comp-card>
          </el-form>
        </el-main>
      </el-container>
    </div>

  </body>
</html>